home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 26 (Anniversary Edition)
/
Volume 26 [Anniversary Edition] - JOGO DISK .iso
/
DEPOSITO
/
sb_bust.swf
/
scripts
/
__Packages
/
GarryObj.as
< prev
next >
Wrap
Text File
|
2006-07-26
|
1KB
|
52 lines
class GarryObj
{
function GarryObj(l_RefMov)
{
_global.C.G_Items.push(l_RefMov._name);
this.RefMov = l_RefMov;
this.Nom = this.RefMov._name;
this.State = "PasLa";
this.StateOld = "PasLa";
this.SADammage = 25;
this.SAPts = 1000;
}
function IsThrow()
{
if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
{
if(_global.C.Enemy.CanBeHit and _global.C.Player.State != "Die" and _global.C.Player.State != "Dead" and _global.C.Player.State != "Win")
{
_global.C.Enemy.CanBeHit = false;
_global.C.Enemy.CanBloc = false;
_global.C.Enemy.State = "GetSnail";
this.State = "PasLa";
}
else
{
this.State = "Miss";
}
}
}
function Miss()
{
if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
{
this.State = "PasLa";
}
}
function ChangeState(l_NewAction)
{
if(this.StateOld != l_NewAction)
{
this.StateOld = this.State;
this.State = l_NewAction;
this.RefMov.gotoAndStop(l_NewAction);
}
}
function Actions()
{
this.ChangeState(this.State);
this[this.State]();
}
}